TQARenderStart
A drawing engine must define a method to initialize a draw context before the engine performs any rendering into that context.
typedef void (*TQARenderStart) ( const TQADrawContext *drawContext, const TQARect *dirtyRect, const TQADrawContext *initialContext);
drawContext
- A draw context.
dirtyRect
- The minimum area of the specified draw context to clear, or the value
NULL
.initialContext
- A previously cached draw context, or the value
NULL
.DESCRIPTION
YourTQARenderStart
function should perform any operations necessary to initialize the draw context specified by thedrawContext
parameter. This includes clearing the z buffer and the color buffers of the draw context. If the value of theinitialContext
parameter isNULL
, then yourTQARenderStart
function should clear the z buffer to 1.0 and set the color buffers to the values of thekQATag_ColorBG_a
,kQATag_ColorBG_r
,kQATag_ColorBG_g
, andkQATag_ColorBG_b
draw context state variables. If, however, the value of theinitialContext
parameter is notNULL
, then yourTQARenderStart
function should use the previously cached draw context specified by that parameter to initialize the draw context specified by thedrawContext
parameter.The
dirtyRect
parameter indicates the minimum area of the specified draw context that should be cleared on initialization. If the value of thedirtyRect
parameter isNULL
, the entire draw context is cleared. If the value of thedirtyRect
parameter is notNULL
, it indicates the rectangle in the draw context to clear. Some drawing engines may exhibit improved performance when an area that is smaller than the entire draw context rectangle is passed. However, the interpretation of thedirtyRect
parameter is dependent on the drawing engine, which may choose to initialize the entire draw context. As a result, code calling yourQARenderStart
function should not use this parameter as a means to avoid clearing all of a draw context or to perform incremental rendering. Instead, that code should use theinitialContext
parameter to achieve such effects.SPECIAL CONSIDERATIONS
Applications should callQARenderStart
before performing any rendering operations in the specified draw context, and they should call eitherQARenderEnd
to signal the end of rendering operations orQARenderAbort
to cancel rendering operations. However, when a drawing engine is performing OpenGL rendering, theQARenderStart
function operates just like the OpenGL functionglClear
. In OpenGL mode, it is not necessary that a call toQARenderStart
always be balanced by a matching call toQARenderEnd
, and drawing commands may occur at any time.